import { request } from '@gui-pkg/request';

enum Api {
  RRAllData = '/api/rsvr/st/findAllStData',
  PPAllData = '/api/pptn/st/findAllStData',
  FindAllPP = '/api/pptn/st/findAllStData',
  Warnmsg = '/api/warnmsg/pageForOneMap',
  HourRain = '/api/pptn/st/find24HourRain',
  AllStData = '/api/pptn/st/findAllStData',
}

// 水库数据
export const getRRAllData = () => {
  return request.post({ url: Api.RRAllData });
}

// 雨量数据
export const getPPAllData = (params) => {
  return request.post({ url: Api.PPAllData ,params});
}

export const getFindAllPPData = () => {
  return request.post({ url: Api.FindAllPP });
}

// 告警点
export const getWarnmsgData = (params) => {
  return request.post({ url: Api.Warnmsg, params});
}

// 查询所有雨量站点实时雨量数据，站点和最新的监测雨量值
export const get24HourRainData = (params) => {
  return request.post({ url: Api.HourRain, params});
}
